import { Limit } from '@common/utils/constants';
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
class ShopListWhereDto {
    /**
     * 店铺名称
     */
    @ApiProperty({
        description: '店铺名称',
        required: false,
    })
    @IsOptional()
    name?: string;
    /**
     * 店铺图片
     */
    @ApiProperty({
        description: '店铺图片',
        required: false,
    })
    @IsOptional()
    thumb_url?: string;
}

export class ShopListDto {
    @ApiProperty()
    @ValidateNested()
    @IsOptional()
    // 这里不加Type不会验证
    @Type(() => ShopListWhereDto)
    where?: ShopListWhereDto;
    @IsOptional()
    @ValidateNested()
    @Type(() => Limit)
    limit?: Limit;
}
